XOBJ = .obj
XEXE = .exe
XLIB = .lib
XLIB_I = .lib
XDLL = .dll
XDLL_I = .dll

COUT = /Fo
LOUT = /OUT:
CUOUT = -o 
AROUT = /NOLOGO /NODEFAULTLIB /OUT:

CUDA_DIR = C:/ots/cuda/${CUDA_VERSION}/${ARCH}
CUDA_LIB = "${CUDA_DIR}/lib/Win32"
CUDA_PATH = ${CUDA_DIR}/include

CC = cl
LINK = link
NVCC = "${CUDA_DIR}/bin/nvcc${XEXE}"
AR = lib

ifeq (${debug},no)
	CFLAGS += -c -nologo -O1 -MD -EHsc -W3 -wd4996 $(addprefix -I",$(addsuffix ",${INCLUDE_PATHS})) $(addprefix -D",$(addsuffix ",${DEFINES}))
	LFLAGS += /NOLOGO $(addprefix /LIBPATH:", $(addsuffix ",$(patsubst -L%,%,$(filter -L%,${LIBS})))) $(patsubst -l%,%,$(filter -l%,${LIBS}))
	CUFLAGS += -c -Xcompiler -O1,-MD,-Zc:wchar_t,-wd4996 $(addprefix -I",$(addsuffix ",${INCLUDE_PATHS})) $(addprefix -D",$(addsuffix ",${DEFINES}))
else
	CFLAGS += -c -Zi -nologo -MD -EHsc -W3 -wd4996 $(addprefix -I",$(addsuffix ",${INCLUDE_PATHS})) $(addprefix -D",$(addsuffix ",${DEFINES}))
	LFLAGS += /NOLOGO /DEBUG $(addprefix /LIBPATH:", $(addsuffix ",$(patsubst -L%,%,$(filter -L%,${LIBS})))) $(patsubst -l%,%,$(filter -l%,${LIBS}))
	CUFLAGS += -c -g -Xcompiler -Zi,-MD,-Zc:wchar_t,-wd4996 $(addprefix -I",$(addsuffix ",${INCLUDE_PATHS})) $(addprefix -D",$(addsuffix ",${DEFINES}))
endif
